import request from '@/utils/request'

export function fetchRoleList(query) {
  return request({
    url: '/api/user/role/getPageRoleList',
    method: 'post',
    data: query
  })
}

export function getRolesList(query) {
  return request({
    url: '/api/user/role/getRolesList',
    method: 'post',
    data: query
  })
}

export function getUcRole(data) {
  return request({
    url: '/api/user/role/getUcRoleDetail',
    method: 'post',
    data: data
  })
}

export function createUcRole(data) {
  return request({
    url: '/api/user/role/saveUcRole',
    method: 'post',
    data: data
  })
}

export function updateUcRole(data) {
  return request({
    url: '/api/user/role/updateUcRole',
    method: 'post',
    data: data
  })
}
